<?
session_start();
if (!isset($_SESSION['Cerrar'])){
	include_once "../clases/claselogs.php";
	$ip=$HTTP_SERVER_VARS["REMOTE_ADDR"];
	$agent=$HTTP_SERVER_VARS["HTTP_USER_AGENT"];
	$referer=getenv("HTTP_REFERER");
	$logs= new Logs("sistema","sispass",$_SESSION['legajo']);
	$logs->setDatos_logs($ip,$agent,$referer);
	/***************************logs**************************************************************/
	$logs->Insertar_en_logs("99","OK");
	/*********************************************************************************************/
	session_unset();
	session_destroy();
	header("Location:index.php");
}
else {
	echo '<html><body><h1><center>'.$_SESSION['Cerrar'].'<br><a href="index.php">Volver a la pagina de ingreso</a></center></h1></body><html>';
	session_unset();
	session_destroy();
}
?>